<?php
/**
 * Description of userPesanFormclass
 *
 * @author Destiya
 */
class userPesanForm extends pesanForm {
    public function configure() {
        $this->useFields(array('id_pengirim', 'id_tujuan', 'judul', 'isi'));

        $this->widgetSchema['id_pengirim'] = new sfWidgetFormInputHidden();
        $this->widgetSchema['id_tujuan'] = new sfWidgetFormChoice(array(
            'choices'=>Doctrine_Core::getTable('user')->getUserList(),
            'expanded'=>false,
            'multiple'=>false,
            'label'=>'Tujuan'
        ));
        $this->widgetSchema['judul'] = new sfWidgetFormInputText();
        $this->widgetSchema['isi'] = new sfWidgetFormTextarea();

        

    }

    public function setIdPengirim($value) {
        $this->setDefault('id_pengirim', $value);
    }
}
?>
